package com.cqie.secondhandtransaction.DTO;


import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.*;
import java.math.BigDecimal;


@Data
public class ProductInfoAddOrEditDTO {
    private Integer id;

    @ApiModelProperty("商品名称")
    @NotBlank(message = "商品名称不能为空！")
    private String productName;

    @ApiModelProperty("商品价格")
    @NotNull(message = "价格不能为空")
    @DecimalMin(value = "0.0", inclusive = false, message = "价格必须大于0")
    private BigDecimal price;

    @ApiModelProperty("商品描述")
    @NotBlank(message = "商品描述不能为空，")
    private String description;

    @ApiModelProperty("商品类别")
    @NotNull(message = "类别不能为空！")
    @Positive(message = "只能是正整数！")
    private Integer typeId;

    @ApiModelProperty("成色")
    @NotBlank(message = "成色不允许为空！")
    private String productLevel;

    @ApiModelProperty("品牌")
    @NotBlank(message = "品牌不允许为空！")
    private String brand;

    private Integer count;

}
